<script setup lang="ts">
import { IResult } from "@/interface/IResult";
import { onMounted, reactive, ref } from 'vue';



interface Item {
  id : number;
  name : string;
}
interface Props {
  title : string;
  data: Item[];
}
const props = defineProps<Props>();
const result = reactive<IResult>({
  code: 0,
  message: 'success',
  data: props.data
})
const  emit = defineEmits(['change']);
const change = () => {
  emit('change', result);
};

onMounted(() => {

});
</script>

<template>
  <el-button @click="change">change</el-button>
  <div>返回标题：{{props.title}}</div>
  <div>返回数据：{{props.data}}</div>
</template>

<style scoped>

</style>